@extends('layouts.admin')
@section('content')
    
          <section id="main-content">
          <section class="wrapper">
              <!-- page start-->
              <div class="row">
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                             编辑用户
                          </header>
                          <div class="panel-body">
                              <div class="form">
                                  <form class="cmxform form-horizontal tasi-form" id="signupForm" action="{{ route('admin.access.users.update',['id'=>$user->id]) }}" method="POST">
                                    <div class="form-group">
                                <label class="col-sm-3 control-label" for="checkbox">所属角色组</label>
                                <div class="col-sm-6">
                                    @inject('rolePresenter','App\Presenters\RolePresenter')

                                    {!! $rolePresenter->rolesCheckbox($hasRoles) !!}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户名 <span class="asterisk">*</span></label>

                                <div class="col-sm-6">
                                    <input type="text"  data-toggle="tooltip" name="name"
                                           data-trigger="hover" class="form-control tooltips"
                                           data-original-title="不可重复" value="{{ $user->name }}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">手机号码 <span class="asterisk">*</span></label>

                                <div class="col-sm-6">
                                    <input type="text"  data-toggle="tooltip" name="mobile"
                                           data-trigger="hover" class="form-control tooltips"
                                           data-original-title="不可重复" value="{{ $user->mobile }}" readonly="true">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">密码 <span class="asterisk">*</span></label>

                                <div class="col-sm-6">
                                    <input type="password"  data-toggle="tooltip" name="password"
                                           data-trigger="hover" class="form-control tooltips"
                                           placeholder="不修改密码请留空"
                                           data-original-title="请输入密码" >
                                </div>
                            </div>
                      
                            <input type="hidden" name="_method" value="PUT">
                            {{ csrf_field() }}

                                      <!-- <div class="form-group ">
                                          <label for="firstname" class="control-label col-lg-2">Firstname</label>
                                          <div class="col-lg-10">
                                              <input class=" form-control" id="firstname" name="firstname" type="text" />
                                          </div>
                                      </div> -->
                                      
                                      <div class="form-group">
                                          <div class="col-lg-offset-2 col-lg-10">
                                              <button class="btn btn-danger" type="submit">保存</button>
                                              <!-- <button class="btn btn-default" type="button">Cancel</button> -->
                                          </div>
                                      </div>
                                  </form>
                              </div>
                          </div>
                      </section>
                  </div>
              </div>
              <!-- page end-->
          </section>
      </section>
@endsection